home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / xw2.000 / xw2 / xw / applications / adder / adder.c next >
Encoding:
C/C++ Source or Header  |  1994-12-17  |  947 b   |  23 lines

  1.  
  2. #include "stdlib.h"            /* Standard Includes                          */
  3. #include "stdio.h"
  4.  
  5. #define MFI_INIT 1
  6. #include "addermfx.h"          /* Get MFX Data Structure                     */
  7. #include "xbmfx.c"             /* Get Lowlevel Routines for MFX Read/Write   */
  8. #include "addermfx.c"          /* Ret Read and Write MFX Routines            */
  9.  
  10. main(){
  11.   ReadMFXGroup_mfi(0,0);       /* Data Input Section                         */
  12.   mfi.Display=1;               /* Data Processing:    activate object display*/
  13.   switch(mfi.Cmd[0]){                              /* execute command        */
  14.     case 'A' : mfi.Sum = mfi.A + mfi.B; break;     /* ADD                    */
  15.     case 'S' : mfi.Sum = mfi.A - mfi.B; break;     /* SUB                    */
  16.     default  : mfi.Display=0;                      /* object display OFF     */
  17.     };
  18.   WriteMFXGroup_mfi(0,0,0);    /* Data Output Section                        */
  19.   };
  20.  
  21.  
  22.  
  23.